// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author lingchuanzhou19320
 * @date 2022/6/8
 */
@AllArgsConstructor
@Getter
public enum ResourceUsingTrendChartChartTypeEnum {
    CPU_USING_TREND("CPU","container_cpu_usage_seconds_total", "CPU占用趋势"),
    MEMORY_USING_TREND("MEMORY","container_memory_working_set_bytes", "内存占用趋势"),
    PVC_USING_TREND("PVC","kube_persistentvolumeclaim_resource_requests_storage_bytes", "存储占用趋势"),
    VGPU_MEMORY_USING_TREND("VGPU_MEMORY","ORIONX_VGPU_MEMORY_USAGE", "VGPU显存占用趋势"),
    VGPU_RATIO_USING_TREND("VGPU_RATIO","ORIONX_TOTAL_RATIO_USAGE", "VGPU算力占用趋势");
    private String queryType;
    private String queryWords;
    private String queryDesc;

    public static String getQueryWords(String queryType) {
        for (ResourceUsingTrendChartChartTypeEnum resourceUsingTrendChartChartTypeEnum: ResourceUsingTrendChartChartTypeEnum.values()) {
            if(queryType.equals(resourceUsingTrendChartChartTypeEnum.getQueryType())) {
                return resourceUsingTrendChartChartTypeEnum.getQueryWords();
            }
        }
        return "";
    }
}
